#include "tcpsrv.h"
#include <stdio.h>

int purgedir(const char *host,const char *cachename){

	if (access("purge",0) != -1){
		char command[255]={};
		sprintf(command,"./purge -p %s -P 1 -e %s &",host,cachename);
		system(command);
	}
	else{
		printf("Purge not exists");
		return 1;
	}
	return 0;
}
/*
int main(){
	char *h="localhost:80";
	char *cn="baixing.com";
	purgedir(h,cn);
}
*/
